package com.lxq.action;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/heade")
public class headController {
    @RequestMapping("/headcontroller")
    public  String testHeadController(
            @RequestHeader(value = "User-Agent",required =false,defaultValue = "headeer")String userAgent,
            @CookieValue(value = "JSESSIONID",required = false,defaultValue = "MyJsessionId")String sessionId){
        System.out.println("请求头:"+userAgent);
        System.out.println("sessionId"+sessionId);
        return null;
    }
}
